import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';

// 引入normalize.css 全局样式文件
import 'normalize.css';

// 引入阿里图标样式文件
import '@/assets/iconfont/iconfont.css';
// 配置路由
import { HashRouter, BrowserRouter as Router } from 'react-router-dom';
// 导入store仓库
//++++
import { store, persistor } from './store/index';

import { Provider } from 'react-redux';

//++++
import { PersistGate } from 'redux-persist/integration/react'

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <Provider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <Router>
        <App />
      </Router>
    </PersistGate>
  </Provider>

);
